package com.itheima.model;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

import java.util.List;

@Data
public class User {
        private String username;
        private String password;
        private Boolean enable;
        /** 用户拥有的权限 */
        private List<GrantedAuthority> authorities;

        public boolean isEnabled() {
            return enable;
        }

        /** 以下方法暂时用不到，全部设置为true */

        public boolean isAccountNonExpired() {
            return true;
        }


        public boolean isAccountNonLocked() {
            return true;
        }


        public boolean isCredentialsNonExpired() {
            return true;
        }
}
